import java.util.Scanner;
public class Test {

    public static void main1(String[] args) {
        double grade;
        double sum = 0;
        int n = 0;
        Scanner input = new Scanner(System.in);
        System.out.println("请输入成绩，负数表示结束");
        grade = input.nextDouble();
        if (grade >= 0) {
            do {
                sum += grade;
                n++;
                grade = input.nextDouble();
            }while (grade >= 0);
        }
        if (n >= 0) {
            System.out.println("平均成绩为" + sum / n);
        }

    }

    public static void main13(String[] args) {
        double d[] = new double[30];

    }

    public static void main2(String[] args) {
        int i = 0;
        int j = 10;
        do {
            if (i++ > --j) {
                break;
            }
        }while (i < 5);
        System.out.println(i);
        System.out.println(j);
    }

    public static void main(String[] args) {
        int count;
        for (int i = 0; true; i++) {
            count = 0;
            count += i;
        }

    }


}
